**** OPEN OUTPUT LOG FILE  *****


log using "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\OUTPUT\Performance Management.APPENDIX E MODELS.04-10-2025.smcl", replace 




*** APPENDIX E MODELS: DECOMPOSITION OF RELATIVE TYPE I ERROR RATES BETWEEN PROGRAM UNDERPAYMENT ERRORS AND PROGRAM DENIAL ERRORS (MODEL E1 & MODEL E2) ***



*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************







*** MODELS PREDICTING VARIOUS TYPE OF PROGRAM ERROR RATES BASED ON BAM SAMPLING RATES ***





*** MODEL E1: RELATIVE TYPE I ERROR RATE: TYPE I ERRORS RELATIVE TO UNDERPAYMENT TYPE II ERRORS (SAMPLE WEIGHTED)***

* [# overpayment errors / paid claims sample] / ([# overpayment errors / paid claims sample] + [# underpayment errors / paid claims sample] + [# underpayment errors / denied claims sample])





*** MODEL E2: RELATIVE TYPE I ERROR RATE: TYPE I ERRORS RELATIVE TO ERRONEOUS DENIAL TYPE II ERRORS (SAMPLE WEIGHTED)***

* [# overpayment errors / paid claims sample] / ([# overpayment errors / paid claims sample] + [# erroneous denial errors / denied claims sample])







****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





*** RETRIEVE MANUSCRIPT MODELS DATABASE [as of 04-10-2025] ***


use "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\DATA\Performance Management.MANUSCRIPT DATABASE.04-10-2025.dta", clear






*** CREATE NEW RELATIVE TYPE I ERROR RATE VARIABLES UNIQUE FOR APPENDIX E [New: 05-07-2025] ***


* Relative Type I Error Rate: ONLY Underpayment Type II Errors (MODEL E1)
gen relt1error_up = t1error_rat/(t1error_rat + t2underp_pcrat + t2underp_dcrat)
*
*
* Relative Type I Error Rate: ONLY Erroneous Denial Type II Errors (MODEL E2)
gen relt1error_denial = t1error_rat/(t1error_rat + t2denial_dcrat)



*** SET DATA TO PANEL STRUCTURE  ***

xtset stateid monthyear, monthly

*
*
*
*



**** TABLE E1 -- MODELS E1-E2: "TASK COMPLEXITY, ORGANIZATIONAL ADAPTATION & PROGRAM ERROR RATES" APPENDIX E STATISTICAL ANALYSES [APRIL 2025]: ORGANIZATIONAL ADAPTATION EFFECTS ON PROGRAM PAYMENT ERROR RATES [RELATIVE TYPE I PROGRAM ERROR RATE, DISAGGREGATED BY TYPE II UNDERPAYMENTS AND TYPE II ERRONEOUS DENIALS] **** 


** (MODEL E1; FIGURES E1A-E1C; MODEL E2: FIGURES E2A-E2C) **



***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************



*** COMPUTE CATEGORICAL TASK COMPLEXITY COVARIATE MEASURES [CONDITIONAL ADAPTATION TO IT MODERNIZATION REFORMS] ***

** PURPOSE: COMPUTE MARGINAL DIFFERENTIAL EFFECTS IN MANUSCRIPT MODELS [BASED ON EFFECTIVE SAMPLE OF OBSERVATIONS] **



** (1) INTERSTATE CASE RATES [PAID & DENIED CLAIMS SAMPLES: TOTAL ERROR RATE & RELATIVE TYPE I ERROR RATE [MODELS E1 & E2] **


* Relative Type I Error Rate: MODEL E1 [same as Overall Program Error Rate since Contains Both Type I & Type II Program Error Rates] *

quietly reg relt1error_up  itmod_monthcount  tot_interstate    tot_diffoccupseek demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat  i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt  if itmod_adopt_state==1
*
*
sum tot_interstate if e(sample), detail
di r(p75)
di r(p25)
*
gen relt1_interstate_catE1 =.
replace relt1_interstate_catE1 = 0 if tot_interstate<= r(p25) 
replace relt1_interstate_catE1 = 1 if tot_interstate> r(p25) & tot_interstate < r(p75) 
replace relt1_interstate_catE1 = 2 if tot_interstate>= r(p75) 
*
tab relt1_interstate_catE1
tab relt1_interstate_catE1 if itmod_adopt_state==1

*
*
*
*

* Relative Type I Error Rate: MODEL E2 [same as Overall Program Error Rate since Contains Both Type I & Type II Program Error Rates] *

quietly reg relt1error_denial  itmod_monthcount  tot_interstate    tot_diffoccupseek demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat  i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt  if itmod_adopt_state==1
*
*
sum tot_interstate if e(sample), detail
di r(p75)
di r(p25)
*
gen relt1_interstate_catE2 =.
replace relt1_interstate_catE2 = 0 if tot_interstate<= r(p25) 
replace relt1_interstate_catE2 = 1 if tot_interstate> r(p25) & tot_interstate < r(p75) 
replace relt1_interstate_catE2 = 2 if tot_interstate>= r(p75) 
*
tab relt1_interstate_catE2  if e(sample)
tab relt1_interstate_catE2  if e(sample) & itmod_adopt_state==1



*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************



** (2) DIFFERENT OCCUPATION SEEKING RATE [PAID & DENIED CLAIMS SAMPLES: TOTAL ERROR RATE & RELATIVE TYPE I ERROR RATE [MODELS E1 & E2] **


* Relative Type I Error Rate: MODEL E1 [same as Overall Program Error Rate since Contains Both Type I & Type II Program Error Rates] *

quietly reg relt1error_up  itmod_monthcount  tot_interstate    tot_diffoccupseek demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat  i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt  if itmod_adopt_state==1
*
*
sum tot_diffoccupseek if e(sample), detail
di r(p75)
di r(p25)
*
gen relt1_diffoccupseek_catE1 =.
replace relt1_diffoccupseek_catE1 = 0 if tot_diffoccupseek<= r(p25) 
replace relt1_diffoccupseek_catE1 = 1 if tot_diffoccupseek> r(p25) & tot_diffoccupseek < r(p75) 
replace relt1_diffoccupseek_catE1 = 2 if tot_diffoccupseek>= r(p75) 
*
tab relt1_diffoccupseek_catE1 if e(sample)
tab relt1_diffoccupseek_catE1 if e(sample) & itmod_adopt_state==1

*
*
*
*

* Relative Type I Error Rate: MODEL E2 [same as Overall Program Error Rate since Contains Both Type I & Type II Program Error Rates] *

quietly reg relt1error_denial  itmod_monthcount  tot_interstate    tot_diffoccupseek demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat  i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt  if itmod_adopt_state==1
*
*
sum tot_diffoccupseek if e(sample), detail
di r(p75)
di r(p25)
*
gen relt1_diffoccupseek_catE2 =.
replace relt1_diffoccupseek_catE2 = 0 if tot_diffoccupseek<= r(p25) 
replace relt1_diffoccupseek_catE2 = 1 if tot_diffoccupseek> r(p25) & tot_diffoccupseek < r(p75) 
replace relt1_diffoccupseek_catE2 = 2 if tot_diffoccupseek>= r(p75) 
*
tab relt1_diffoccupseek_catE2 if e(sample)
tab relt1_diffoccupseek_catE2 if e(sample) & itmod_adopt_state==1





***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




*** ESTIMATE MODEL E1: RELATIVE TYPE I ERROR RATE (SAMPLE WEIGHTED): TYPE I ERRORS RELATIVE TO ONLY UNDERPAYMENT TYPE II ERRORS ***  (FIGURES E1A-E1C) 

* DV: [# overpayment errors / paid claims sample] / ([# overpayment errors / paid claims sample] + [# underpayment errors / paid claims sample] + [# underpayment errors / denied claims sample]) *** 	


npregress series relt1error_up itmod_monthcount i.relt1_interstate_catE1   i.relt1_diffoccupseek_catE1  if itmod_adopt_state==1, asis(demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat   i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt)  vce(bootstrap, seed(123) rep(1000))



** COMPUTE PSEUDO R^2 [SSE / (SSE + SSR) = EXPLAINED/PREDICTED SUM OF SQUARES / (EXPLAINED/PREDICTED SUM OF SQUARES + RESIDUAL SUM OF SQUARES)] = SSE / SST

predict predsy_m1e if e(sample)
predict residsy_m1e if e(sample), residuals

gen sse_m1e = predsy_m1e * predsy_m1e if e(sample)
gen ssr_m1e = residsy_m1e * residsy_m1e if e(sample)

egen sum_sse_m1e = total(sse_m1e) if e(sample)
egen sum_ssr_m1e = total(ssr_m1e) if e(sample)

gen r2_m1e = sum_ssr_m1e/(sum_sse_m1e + sum_ssr_m1e)

sum r2_m1e



*
*
*
* [MODEL E1: RELATIVE TYPE I ERROR RATE : UNDERPAYMENT TYPE II ERRORS] FIGURE E1A:  UNCONDITIONAL ADAPTATION EFFECTS -- E(Y) [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]

margins, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) ///
legend(on order(1 "Unconditional Adaptation") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE E1A}""{bf:Unconditional Adaptation Effect}" "{bf:(Relative Type I Program Error Rate: Underpayment Type II Program Error Rate)}" "{bf:[MODEL E1]}", size(10pt) linegap(0.7) margin(t+1 b+2 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E1.FIGURE E1A.04-10-2025.gph", replace
*
*
*
*
* [MODEL E1: RELATIVE TYPE I ERROR RATE : UNDERPAYMENT TYPE II ERRORS] Figure E1B (relt1_interstate_catE1==2) & LOW COMPLEXITY (relt1_interstate_catE1==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.relt1_interstate_catE1 if relt1_interstate_catE1==0|relt1_interstate_catE1==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))


marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE E1B}""{bf:Conditional Adaptation Marginal Effect By Task Complexity: Interstate Claims}" "{bf: (Relative Type I Program Error Rate: Underpayment Type II Program Error Rate)}" "{bf:[MODEL E1]}", size(10pt) linegap(0.7) margin(t+1 b+2 r-10)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E1.FIGURE E1B.04-10-2025.gph", replace
*
*
*
* [MODEL E1: RELATIVE TYPE I ERROR RATE : UNDERPAYMENT TYPE II ERRORS] Figure E1C:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (relt1_diffoccupseek_catE1==2) & LOW COMPLEXITY (relt1_diffoccupseek_catE1==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***
margins r.relt1_diffoccupseek_catE1 if relt1_diffoccupseek_catE1==0|relt1_diffoccupseek_catE1==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE E1C}""{bf:Conditional Adaptation Marginal Effect By Task Complexity: Seeking Different Occupation}" "{bf:(Relative Type I Program Error Rate: Underpayment Type II Program Error Rate)}" "{bf:[MODEL E1]}", size(10pt) linegap(0.7) margin(t+1 b+1 r-10)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E1.FIGURE E1C.04-10-2025.gph", replace
*


****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





***ESTIMATE MODEL E2: RELATIVE TYPE I ERROR RATE: (SAMPLE WEIGHTED): TYPE I ERRORS RELATIVE TO ONLY ERRONEOUS DENIAL TYPE II ERRORS  ***  (FIGURES E2A-E2C) 

* DV: [# overpayment errors / paid claims sample] / ([# overpayment errors / paid claims sample] + [# erroneous denial errors / denied claims sample])


npregress series relt1error_denial  itmod_monthcount  i.relt1_interstate_catE2   i.relt1_diffoccupseek_catE2  if itmod_adopt_state==1, asis(demgovparty repgovparty ln_workload automationrate ln_uiadmin_budget_real benefitgenerosity2 unemp_rate ln_function_sup_avgsalreal  tot_totalnonwhite_rat tot_totalfemale_rat tot_totalageu25o65_rat  i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt)  vce(bootstrap, seed(123) rep(1000))
*
*
*

** COMPUTE PSEUDO R^2 [SSE / (SSE + SSR) = EXPLAINED/PREDICTED SUM OF SQUARES / (EXPLAINED/PREDICTED SUM OF SQUARES + RESIDUAL SUM OF SQUARES)] = SSE / SST

predict predsy_m2e if e(sample)
predict residsy_m2e if e(sample), residuals

gen sse_m2e = predsy_m2e * predsy_m2e if e(sample)
gen ssr_m2e = residsy_m2e * residsy_m2e if e(sample)

egen sum_sse_m2e = total(sse_m2e) if e(sample)
egen sum_ssr_m2e = total(ssr_m2e) if e(sample)

gen r2_m2e = sum_ssr_m2e/(sum_sse_m2e + sum_ssr_m2e)

sum r2_m2e



* [MODEL E2: RELATIVE TYPE I ERROR RATE : ERRONEOUS DENIAL TYPE II ERRORS] FIGURE E2A:  UNCONDITIONAL ADAPTATION EFFECTS -- E(Y) [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]

margins, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) ///
legend(on order(1 "Unconditional Adaptation") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE E2A}""{bf:Unconditional Adaptation Effect}" "{bf:(Relative Type I Program Error Rate: Erroneous Denial Type II Program Error Rate)}" "{bf:[MODEL E2]}", size(10pt) linegap(0.7) margin(t+1 b+2 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)

*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E2.FIGURE E2A.04-10-2025.gph", replace




* [MODEL E2: RELATIVE TYPE I ERROR RATE : ERRONEOUS DENIAL TYPE II ERRORS] Figure E2B (relt1_interstate_catE2==2) & LOW COMPLEXITY (relt1_interstate_catE2==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.relt1_interstate_catE2 if relt1_interstate_catE2==0|relt1_interstate_catE2==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))


marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE E2B}""{bf:Conditional Adaptation Marginal Effect By Task Complexity: Interstate Claims}" "{bf: (Relative Type I Program Error Rate: Erroneous Denial Type II Program Error Rate)}" "{bf:[MODEL E2]}", size(10pt) linegap(0.7) margin(t+1 b+2 r-10)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E2.FIGURE E2B.04-10-2025.gph", replace
*
*
*

* [MODEL E2: RELATIVE TYPE I ERROR RATE : ERRONEOUS DENIAL TYPE II ERRORS] Figure E2C:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (relt1_diffoccupseek_catE2==2) & LOW COMPLEXITY (relt1_diffoccupseek_catE2==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***
margins r.relt1_diffoccupseek_catE2 if relt1_diffoccupseek_catE2==0|relt1_diffoccupseek_catE2==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE E2C}""{bf:Conditional Adaptation Marginal Effect By Task Complexity: Seeking Different Occupation}" "{bf:(Relative Type I Program Error Rate: Erroneous Denial Type II Program Error Rate)}" "{bf:[MODEL E2]}", size(10pt) linegap(0.7) margin(t+1 b+1 r-10)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model E2.FIGURE E2C.04-10-2025.gph", replace





****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




log close
